/**
 * 继承 Thread, 重写 run, 使用匿名内部类
 */
public class ThredDemo5 {
    public static void main(String[] args) {
        Thread thread = new Thread() {
            @Override
            public void run() {
                Thread t = Thread.currentThread();
                System.out.println("任务执行：" + t.getName());
            }
        };
        thread.start();
    }
}
